import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
// 导入Router
import router from './router';
//引入pinia
import pinia from './store';
import elementPlus from 'element-plus';
import 'element-plus/dist/index.css';
// 导入svg-icons
import 'virtual:svg-icons-register';
// 导入element-plus图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import SvgIcon from './components/SvgIcon/Index.vue';
// 引用中文
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

const app = createApp(App);
app.use(router);
app.use(pinia);
//将图标进行全局注册
for(const [key,component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key,component);
}
app.component('svg-icon',SvgIcon);
app.use(elementPlus,{
    locale: zhCn
});
app.mount('#app');
